package cn.angis.quartz.service;

import cn.angis.db.service.BaseService;
import cn.angis.quartz.dto.input.JoblogInput;
import cn.angis.quartz.dto.output.JoblogOutput;
import cn.angis.quartz.mapper.JoblogMapper;
import cn.angis.quartz.model.Joblog;
import org.beetl.sql.core.SQLReady;
import org.noear.solon.annotation.Component;

import java.util.List;

/**
* 定时任务调度日志表服务
* @author angis.cn
* @Date 2025-06-04
*/
@Component
public class JoblogService extends BaseService<JoblogMapper, Joblog> {
    public void cleanJobLog() {
        baseMapper.getSQLManager().executeUpdate(new SQLReady("truncate table sys_job_log"));
    }

    public List<JoblogOutput> list(JoblogInput joblogInput) {
        return baseMapper.selectList(joblogInput);
    }
}